﻿// ===============================================================================
// XCI.NET 西安交通信息WinForm开发框架 2018 版权所有
// ===============================================================================

using XCI.Helper;

namespace XCI.Core
{
    /// <summary>
    /// 上传更新包配置
    /// </summary>
    public class UpgradeConfig
    {
        private static readonly JsonFile<UpgradeConfig> JsonFile = new JsonFile<UpgradeConfig>(IOHelper.GetRootFilePath("upgrade.json"));

        /// <summary>
        /// 上传密码
        /// </summary>
        public string Password { get; set; }

        /// <summary>
        /// 更新包目录
        /// </summary>
        public string Catalog { get; set; }

        /// <summary>
        /// 获取配置
        /// </summary>
        public static UpgradeConfig Get()
        {
            return JsonFile.Data;
        }

        /// <summary>
        /// 保存配置
        /// </summary>
        public static void Save()
        {
            JsonFile.Save();
        }
    }
}